package com.haizhi.bean;

// Generated 2016-8-15 17:44:37 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity: 
 */
@Entity
@Table(name = "tb_feed", catalog = "db_lemon3d")
public class TbFeed implements java.io.Serializable {

	/** 
	 * ��̬id.
	 */

	private Integer feedId;

	/** 
	 * ������id.
	 */

	private TbUser tbUserByTargetId;

	/** 
	 * ������id.
	 */

	private TbUser tbUserByUserId;

	/** 
	 * ��̬.
	 */

	private String feedMessage;

	/** 
	 * ����ʱ��.
	 */

	private Date feedAddTime;

	/** 
	 * �Ƿ��Ѿ����鿴.
	 */

	private int feedIsSee;

	public TbFeed() {
	}

	public TbFeed(TbUser tbUserByTargetId, TbUser tbUserByUserId,
			String feedMessage, Date feedAddTime, int feedIsSee) {
		setTbUserByTargetId(tbUserByTargetId);
		setTbUserByUserId(tbUserByUserId);
		setFeedMessage(feedMessage);
		setFeedAddTime(feedAddTime);
		setFeedIsSee(feedIsSee);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "feed_id", unique = true, nullable = false)
	public Integer getFeedId() {
		return this.feedId;
	}

	public void setFeedId(Integer feedId) {
		this.feedId = feedId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "target_id", nullable = false)
	public TbUser getTbUserByTargetId() {
		return this.tbUserByTargetId;
	}

	public void setTbUserByTargetId(TbUser tbUserByTargetId) {
		this.tbUserByTargetId = tbUserByTargetId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	public TbUser getTbUserByUserId() {
		return this.tbUserByUserId;
	}

	public void setTbUserByUserId(TbUser tbUserByUserId) {
		this.tbUserByUserId = tbUserByUserId;
	}

	@Column(name = "feed_message", nullable = false, length = 300)
	public String getFeedMessage() {
		return this.feedMessage;
	}

	public void setFeedMessage(String feedMessage) {
		this.feedMessage = feedMessage;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "feed_add_time", nullable = false, length = 19)
	public Date getFeedAddTime() {
		return this.feedAddTime;
	}

	public void setFeedAddTime(Date feedAddTime) {
		this.feedAddTime = feedAddTime;
	}

	@Column(name = "feed_is_see", nullable = false)
	public int getFeedIsSee() {
		return this.feedIsSee;
	}

	public void setFeedIsSee(int feedIsSee) {
		this.feedIsSee = feedIsSee;
	}

}
